package chapter10.practice13;

import chapter10.practice9.SimpleInterface;

/**
 * 匿名内部类实现练习9
 * Created by yangliwei on 2017/10/21.
 */
public class SimpleClass {
    public SimpleInterface getSimpleInterface(){
        return new SimpleInterface(){
            @Override
            public void f() {
                System.out.println("I'm called");
            }
        };
    }
    SimpleClass simpleClass = new SimpleClass();
    SimpleInterface simpleInterface = simpleClass.getSimpleInterface();

}
